import { NavBar } from "antd-mobile";
import React, { FC } from "react";
import { useNavigate } from "react-router-dom";

type Props = {
  title: string;
};

const My_navbar: FC<Props> = ({ title }) => {
  const navigate = useNavigate();
  return <NavBar onBack={() => navigate(-1)}>{title}</NavBar>;
};

export default My_navbar;
